#ifndef _AD7606_H_
#define _AD7606_H_

#include <reg52.h>

sbit CS=P1^0;
sbit SCLK=P1^1;
sbit DAT=P1^2;
sbit RANGE=P0^0;
sbit RST=P0^1;
sbit CONVST=P0^2;
sbit OS0=P0^3;
sbit OS1=P0^4;
sbit OS2=P0^5;
sbit BUSY=P0^6;

void AD7606DelayMs(unsigned int timer);
void AD7606DelayUs(unsigned char timer);
void AD7606StartConvst(void);
void AD7606Reset(void);
void AD7606SetInputVoltage(unsigned char vlaue);
void AD7606SetSamplingMode(unsigned char vlaue);
unsigned int AD7606ReadData(void);
void AD7606Init(void);

#endif
